package net.hn.hnms.biz.plan.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.sql.Date;

/**
 * 掘进工作面信息
 *
 * @author ly
 * @since 1.0.0 2022-08-16
 */
@Data
@ApiModel("掘进工作面信息")
public class DimDrivageFaceReq extends BaseReq {

    @ApiModelProperty(value = "id")
    private String drivageFaceId;
    @ApiModelProperty(value = "煤矿编号")
    private String mineCode;
    @ApiModelProperty(value = "巷道编号")
    @NotBlank(message = "巷道编号不能为空")
    @Length(max = 100,message = "巷道编号长度不能超过100个字符")
    private String drivageTunnelCode;

    @ApiModelProperty(value = "设计掘进长度（m）")
    private BigDecimal drivageFaceLength;

    @ApiModelProperty(value = "坡度")
    @Digits(integer = 9, fraction=2, message = "坡度格式不正确")
    @DecimalMin(value = "0.00", message = "坡度格式不正确")
    private BigDecimal drivageFaceSlope;

    @ApiModelProperty(value = "掘进方向")
    @NotBlank(message = "掘进方向不能为空")
    @Length(max = 100,message = "掘进方向不能超过100个字符")
    private String drivageFaceDirection;

    @ApiModelProperty(value = "总工程量")
    @Digits(integer = 9, fraction=2, message = "总工程量格式不正确")
    @DecimalMin(value = "0.00", message = "总工程量格式不正确")
    private BigDecimal drivageFaceAmount;

    @ApiModelProperty(value = "预计开工时间")
    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
    @NotNull(message = "请选择预计开工时间")
    private Date drivageFaceStartDate;

    @JsonFormat(
            pattern = "yyyy-MM-dd",
            timezone = "GMT+8"
    )
    @NotNull(message = "请选择预计竣工时间")
    @ApiModelProperty(value = "预计竣工时间")
    private Date drivageFaceEndDate;

    @ApiModelProperty(value = "掘进工作面编号")
    @NotBlank(message = "工作面编号不能为空")
    @Length(max = 100,message = "工作面编号长度不能超过100个字符")
    private String drivageFaceCode;

    @ApiModelProperty(value = "掘进工作面名称")
    @NotBlank(message = "工作面名称不能为空")
    @Length(max = 100,message = "工作面名称长度不能超过100个字符")
    private String drivageFaceName;


    @ApiModelProperty(value = "公司编号")
    private String companyCode;


    @ApiModelProperty(value = "煤矿名称")
    private String mineName;

    @ApiModelProperty(value = "公司名称")
    private String companyName;

    @ApiModelProperty(value = "是否重点区域")
    private String isKeyArea;


}
